package cloudgamesaumysql

import (
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2025/3/6 15:31
*/

// CGGameAUFlowLimit 云游戏流量限制表
type CGGameAUFlowLimit struct {
	ID                    int64          `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	CGGameAUFlowMonitorID int64          `json:"cg_game_au_flow_monitor_id" gorm:"column:cg_game_au_flow_monitor_id;type:bigint;not null;default:0;comment:云游戏流量监控表ID"`
	LimitType             string         `json:"limit_type" gorm:"column:limit_type;type:varchar(1000);not null;default:'';comment:限流方式 1-总流量 2-ID 3-IP"`
	LimitNum              int64          `json:"limit_num" gorm:"column:limit_num;type:bigint;not null;default:0;comment:流量限制次数"`
	LimitRange            int64          `json:"limit_range" gorm:"column:limit_range;type:bigint;not null;default:0;comment:单位时间 小时"`
	CreatedAt             time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt             time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt             gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAUFlowLimit) TableName() string {
	return "cg_game_au_flow_limit"
}
